# It is recommended to test the script on a local machine for its purpose and effects. # ManageEngine Desktop Central will not be responsible for any # damage/loss to the data/setup based on the behaviour of the script. # Description - Script to find Folder/Drive Size # Parameters - "" # Example - "D:\Test","E:" # Remarks - Enable Logging must be selected to view the output # Configuration Type - COMPUTER/USER # ============================================================== $folder=$args[0] echo "Size of the Folder $folder is" $colItems = (Get-ChildItem $folder -recurse | Measure-Object -property length -sum) "{0:N2}" -f ($colItems.sum / 1MB) + " MB"